package com.gs.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gs.core.dao.BaseDaoI;
import com.gs.core.model.UserModel;
import com.gs.core.service.UserService;
/**
 * @author 汪品文
 * 主要处理复杂业务逻辑    事务处理
 */
@Transactional
@Service
public class UserServiceImpl extends BaseServiceImpl<UserModel> implements UserService {

	@Autowired
	BaseDaoI<UserModel> baseDaoI;
	
	@Override
	public BaseDaoI<UserModel> getDao() {
		return baseDaoI;
	}
	
	@Override
	public void save() {
		UserModel userModel1 = new UserModel();
		userModel1.setName("hh");
		userModel1.setPhone("hh");
		baseDaoI.save(userModel1);
		
		UserModel userModel3 = new UserModel();
		userModel3.setName("aa");
		userModel3.setPhone("aa");
		baseDaoI.save(userModel3);
		
		UserModel userModel2 = new UserModel();
		userModel2.setName("ff");
		userModel2.setPhone("ff");
		baseDaoI.save(userModel2);
		
	}
	
	
	
}
